package mips;

public class AddMulSw {

	public static void writeCode() {

		/**
		 * 	a0000000
		 * 		addi	4,	0,	64
		 * 	00100000000001000000000001000000
		 * 	0x20040040
		 * 
		 *  a0000004
		 * 		addi	5,	0,	-64
		 * 	00100000000001011111111111000000	
		 * 	0x2005FFC0
		 * 	
		 * 	a0000008
		 * 		add		8,	4,	5
		 * 	00000000100001010100000000100000
		 * 	0x00854020
		 * 
		 * 	a000000c
		 * 		bne		8,	0,	a0000000 (-4)
		 * 	00010101000000001111111111111100
		 * 	0x1500FFFC
		 * 
		 * 	a0000010
		 * 		nop
		 * 	0x00000020
		 * 
		 * 	a0000014
		 * 		mult	4,	5
		 * 	00000000100001010000000000011000  
		 * 	0x00850018
		 * 
		 * 	a0000018
		 * 		mflo	8
		 * 	00000000000000000100000000010010
		 * 	0x00004012
		 * 
		 * 	a000001c
		 * 		lui		9,	a040
		 * 	00111100000010011010000001000000
		 * 	0x3C09A040
		 * 
		 * 	a0000020
		 * 		sw		8,	0(9)
		 * 	10101101001010000000000000000000
		 * 	0xAD280000
		 * 
		 * 	a0000024
		 * 		j		a0000024
		 * 	00001000000000000000000000100100
		 * 	0x08000024
		 * 
		 * 	a0000028
		 * 		nop	
		 *	0x00000020
		 */
		n64.MemoryManager.RDRAM[0] = 0x20040040;
		n64.MemoryManager.RDRAM[1] = 0x2005FFC0;
		n64.MemoryManager.RDRAM[2] = 0x00854020;
		n64.MemoryManager.RDRAM[3] = 0x1500FFFC;
		n64.MemoryManager.RDRAM[4] = 0x00000020;
		n64.MemoryManager.RDRAM[5] = 0x00850018;
		n64.MemoryManager.RDRAM[6] = 0x00004012;
		n64.MemoryManager.RDRAM[7] = 0x3C09A040;
		n64.MemoryManager.RDRAM[8] = 0xAD280000;
		n64.MemoryManager.RDRAM[9] = 0x08000024;
		n64.MemoryManager.RDRAM[10] = 0x00000020;
		
		n64.MemoryManager.RDRAM[0] = 0x20040040;
		n64.MemoryManager.RDRAM[1] = 0x2005ffc0;
		n64.MemoryManager.RDRAM[2] = 0x00854020;
		n64.MemoryManager.RDRAM[3] = 0x1500fffc;
		n64.MemoryManager.RDRAM[4] = 0x00000020;
		n64.MemoryManager.RDRAM[5] = 0x00850018;
		n64.MemoryManager.RDRAM[6] = 0x00004012;
		n64.MemoryManager.RDRAM[7] = 0x3c09a040;
		n64.MemoryManager.RDRAM[8] = 0xad280000;
		n64.MemoryManager.RDRAM[9] = 0x08000009;
		n64.MemoryManager.RDRAM[10] = 0x00000020;
	}
}
